<!--分享组件-->
<template>
    <div class="share">
      <a @click="ShowShareBox()" class="share_btn">分享</a>
      <transition name="bounceIn" enter-active-class="animated tada" leave-active-class="animated bounceOutDown">
        <div class="shareBox " v-show="isShowBox">
          <p class="close" @click="close()"></p>
          <p class="shareTo">分享到</p>
          <ul class="share_bg clearfix">
            <li><a href=""></a></li>
            <li><a href=""></a></li>
            <li><a href=""></a></li>
          </ul>
        </div>
      </transition>
    </div>
</template>

<script>
  export default {
    data () {
      return {
        msg: 'Welcome to Your Vue.js App',
        isShowBox: false
      }
    },
    methods: {
      ShowShareBox: function () {
        this.isShowBox = !this.isShowBox
      },
      close: function () {
        this.isShowBox = false
      }
    }
  }
</script>


<style>
  .share{
    position: relative;
  }
  .close{
    position: absolute;
    width: 16px;
    height: 16px;
    right: 10px;
    top:10px;
    background: url(../../../../static/img/bookinfo/close1.png) no-repeat;
    background-size: 100% 100%;
  }
.share_bg{
  background: url(/static/img/bookinfo/share2.png) no-repeat;
  width: 246px;
  height: 86px;
  margin-top: 10px;
  background-size: cover;
  margin-bottom: 0;
}
.shareTo{
  text-align: center;
}
.shareBox{
  position: fixed;
  left:50%;
  margin-left: -144px;
  top:50%;
  margin-top: -88px;
  padding:21px;
  width: 288px;
  height: 150px;
  border-radius: 5px;
  box-shadow: 0 0 6px rgba(0,0,0,.5);
  z-index: 999999999;
  background: #fff;

}
  .shareBox ul li{
    width:82px;
    height: 86px;
    float: left;
  }
  .share_btn{
    padding-left: 16px;
    background: url(/static/img/bookinfo/share.png) left center no-repeat;
    background-size: 12px 12px;
  }
</style>
